package com.foreknow.demo3;

public class MethodDemo2 {

    public static boolean login(String username,String password){
        if("fender".equals(username)&&"123456".equals(password)) {
            return true;
        }else {
            return false;
        }
    }

    public static void main(String[] args) {
        boolean isRight = MethodDemo2.login("fender","123456");
        if(isRight) {
            System.out.println("登录成功.....");
        }else {
            System.out.println("登录失败.....");
        }
    }
}
